/*
 clear .css file by nodejs 
*/
import React, { Component,  } from 'react'
import PropTypes from 'prop-types'
export default class EmptyData extends Component{
  static defaultProps ={
    text:'',
    image : 'assets/images/icons/no_order.png',
    button:false,
    imgStyle:{}
  };
  static propTypes = {
    text : PropTypes.string.isRequired,
    image : PropTypes.string.isRequired,
    button : PropTypes.bool,
    imgStyle  : PropTypes.object
  };

  render(){
    let {image , text , button,imgStyle } = this.props;
    return(
      <div className="empty-data">
        <div className="empty-data-img">
          <img src={image} style={imgStyle} alt="" />
        </div>
        <div className="empty-data-text">
          <span>{text}</span>
        </div>
        { button ? (
            <div className="form-input">
              <a onClick={this.props.buttonTouch} className="btn sibu-btn center-btn">
                {this.props.buttonText}
              </a>
            </div>
          ):null
        }
      </div>
    )
  }
}
